function clone(oldObj){
if(oldObj==null) return null
if( typeOf oldObj !== object) return oldObj
var newObj=Array.isArray(oldObj) ? [] : {}
for(var key in oldObj){
newObj[key] = oldObj[key]
}
return newObj
}